import request from '@/utils/request'

export function workTypeApi (params) {
  return request({
    url: '/api/ticketConfig/typeList',
    method: 'GET',
    params
  })
}
// 风险级别
export function riskLevelListApi (params) {
  return request({
    url: '/api/ticketConfig/riskLevelList',
    method: 'GET',
    params
  })
}
export function addRiskLevelApi (params) {
  return request({
    url: '/api/ticketConfig/addRiskLevel',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: params
  })
}
export function updateRiskLevelApi (params) {
  return request({
    url: '/api/ticketConfig/updateRiskLevel',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: params
  })
}
export function deleteRiskLevelApi (params) {
  return request({
    url: '/api/ticketConfig/deleteRiskLevel',
    method: 'DELETE',
    params
  })
}

// 作业票作业方式
export function workModeListApi (params) {
  return request({
    url: '/api/ticketConfig/workModeList',
    method: 'GET',
    params
  })
}
export function addWorkModeApi (params) {
  return request({
    url: '/api/ticketConfig/addWorkMode',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: params
  })
}
export function updateWorkModeApi (params) {
  return request({
    url: '/api/ticketConfig/updateWorkMode',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: params
  })
}
export function deleteWorkModeApi (params) {
  return request({
    url: '/api/ticketConfig/deleteWorkMode',
    method: 'DELETE',
    params
  })
}

// 作业票风险辨识
export function riskIdentificationListApi (params) {
  return request({
    url: '/api/ticketConfig/riskIdentificationList',
    method: 'GET',
    params
  })
}
export function addRiskIdentificationApi (params) {
  return request({
    url: '/api/ticketConfig/addRiskIdentification',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: params
  })
}
export function updateRiskIdentificationApi (params) {
  return request({
    url: '/api/ticketConfig/updateRiskIdentification',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: params
  })
}
export function deleteRiskIdentificationApi (params) {
  return request({
    url: '/api/ticketConfig/deleteRiskIdentification',
    method: 'DELETE',
    params
  })
}

// 作业票风险辨识
export function securityMeasureListApi (params) {
  return request({
    url: '/api/ticketConfig/securityMeasureList',
    method: 'GET',
    params
  })
}
export function addSecurityMeasureApi (params) {
  return request({
    url: '/api/ticketConfig/addSecurityMeasure',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: params
  })
}
export function updateSecurityMeasureApi (params) {
  return request({
    url: '/api/ticketConfig/updateSecurityMeasure',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: params
  })
}
export function deleteSecurityMeasureApi (params) {
  return request({
    url: '/api/ticketConfig/deleteSecurityMeasure',
    method: 'DELETE',
    params
  })
}


// 作业票分析项
export function analysisItemListApi (params) {
  return request({
    url: '/api/ticketConfig/analysisItemList',
    method: 'GET',
    params
  })
}
export function addAnalysisItemApi (params) {
  return request({
    url: '/api/ticketConfig/addAnalysisItem',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: params
  })
}
export function updateAnalysisItemApi (params) {
  return request({
    url: '/api/ticketConfig/updateAnalysisItem',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: params
  })
}
export function deleteAnalysisItemApi (params) {
  return request({
    url: '/api/ticketConfig/deleteAnalysisItem',
    method: 'DELETE',
    params
  })
}

// 作业时长设置
export function workDurationListApi (params) {
  return request({
    url: '/api/ticketConfig/workDurationList',
    method: 'GET',
    params
  })
}
export function addWorkDurationApi (params) {
  return request({
    url: '/api/ticketConfig/addWorkDuration',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: params
  })
}
export function updateWorkDurationApi (params) {
  return request({
    url: '/api/ticketConfig/updateWorkDuration',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: params
  })
}
export function deleteWorkDurationApi (params) {
  return request({
    url: '/api/ticketConfig/deleteWorkDuration',
    method: 'DELETE',
    params
  })
}

// 作业时长设置
export function workInterruptionDurationListApi (params) {
  return request({
    url: '/api/ticketConfig/workInterruptionDurationList',
    method: 'GET',
    params
  })
}
export function addWorkInterruptionDurationApi (params) {
  return request({
    url: '/api/ticketConfig/addWorkInterruptionDuration',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: params
  })
}
export function updateWorkInterruptionDurationApi (params) {
  return request({
    url: '/api/ticketConfig/updateWorkInterruptionDuration',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: params
  })
}
export function deleteWorkInterruptionDurationApi (params) {
  return request({
    url: '/api/ticketConfig/deleteWorkInterruptionDuration',
    method: 'DELETE',
    params
  })
}

// 审批人设置
export function approverListApi (params) {
  return request({
    url: '/api/ticketConfig/approverList',
    method: 'GET',
    params
  })
}
export function addApproverApi (params) {
  return request({
    url: '/api/ticketConfig/addApprover',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: params
  })
}
 
export function deleteApproverApi (params) {
  return request({
    url: '/api/ticketConfig/deleteApprover',
    method: 'DELETE',
    params
  })
}

export function userListApi (params) {
  return request({
    url: '/api/user/userList',
    method: 'POST',
    data:params
  })
}